package com.hsc.www;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

@RestController
public class MyController {

    @Autowired
    RestTemplate restTemplate;

    @RequestMapping("/cms/getAll")
    @ResponseBody
    Object cms_getAll() {
        return restTemplate.getForObject("http://cms/" + "/cms/getAll", List.class);
    }


    @RequestMapping("/upms/getAll")
    @ResponseBody
    Object upm_getAll() {
        return restTemplate.getForObject("http://upms/" + "/upms/getAll", List.class);
    }


}
